﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace WellDone
{
    public partial class CellEditor : ChildWindow
    {
        public CellEditor()
        {
            InitializeComponent();
        }

        private async void btnOK_Click(object sender, RoutedEventArgs e)
        {
            // Save the updated schedule information
            await scMain.save();
            Globals.schedule.refreshData();
            this.DialogResult = true;
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        public void init(int employeeID, DateTime selectedDate)
        {
            // Initialize the schedule control
            scMain.init(employeeID, selectedDate);
            //this.Height = 300;
        }
    }
}

